home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Reference / DevCon / Atlanta_1990 / Atlanta-Devcon.2 / Libraries / Locale / asmsupp.i next >
Encoding:
Text File  |  1992-08-26  |  1.5 KB  |  68 lines

  1. *************************************************************************
  2. *
  3. *    Copyright (C) 1985, Commodore Amiga Inc.  All rights reserved.
  4. *    Permission granted for non-commercial use
  5. *
  6. * asmsupp.i -- random low level assembly support routines
  7. *           used by the Commodore sample Library & Device
  8. *
  9. *************************************************************************
  10.  
  11. CLEAR    MACRO        ;quick way to clear a D register on 68000
  12.     MOVEQ    #0,\1
  13.     ENDM
  14.  
  15. ;BHS     MACRO
  16. ;     BCC.\0  \1 ;\0 is the extension used on the macro (such as ".s")
  17. ;     ENDM
  18. ;BLO     MACRO
  19. ;     BCS.\0  \1
  20. ;     ENDM
  21. ;EVEN     MACRO         ; word align code stream
  22. ;     DS.W     0
  23. ;     ENDM
  24.  
  25. LINKSYS MACRO        ; link to a library without having to see a _LVO
  26.     MOVE.L    A6,-(SP)
  27.     MOVE.L    \2,A6
  28.     JSR    _LVO\1(A6)
  29.     MOVE.L    (SP)+,A6
  30.     ENDM
  31.  
  32. CALLSYS MACRO        ; call a library via A6 without having to see _LVO
  33.     JSR    _LVO\1(A6)
  34.     ENDM
  35.  
  36. XLIB    MACRO        ; define a library reference without the _LVO
  37.     XREF    _LVO\1
  38.     ENDM
  39. ;
  40. ; Put a message to the serial port at 9600 baud.  Used as so:
  41. ;
  42. ;     PUTMSG   30,<'%s/Init: called'>
  43. ;
  44. ; Parameters can be printed out by pushing them on the stack and
  45. ; adding the appropriate C printf-style % formatting commands.
  46. ;
  47.         XREF    KPutFmt
  48. PUTMSG:     MACRO    * level,msg
  49.  
  50.         IFGE    INFO_LEVEL-\1
  51.  
  52.         PEA    subSysName(PC)
  53.         MOVEM.L A0/A1/D0/D1,-(SP)
  54.         LEA    msg\@(pc),A0    ;Point to static format string
  55.         LEA    4*4(SP),A1      ;Point to args
  56.         JSR    KPutFmt
  57.         MOVEM.L (SP)+,D0/D1/A0/A1
  58.         ADDQ.L    #4,SP
  59.         BRA.S    end\@
  60.  
  61. msg\@        DC.B    \2
  62.         DC.B    10
  63.         DC.B    0
  64.         DS.W    0
  65. end\@
  66.         ENDC
  67.         ENDM
  68.